{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## import useful packages"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "import datetime\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "sns.set_style(\"white\")\n",
    "\n",
    "%matplotlib inline\n",
    "\n",
    "from pydqc.data_summary import distribution_summary_pretty"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## assign values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# the data table (pandas DataFrame)\n",
    "table =\n",
    "print(\"table size: \" + str(table.shape))\n",
    "\n",
    "# global values\n",
    "VER_LINE = \"#4BACC6\"\n",
    "TEXT_LIGHT = \"#DAEEF3\"\n",
    "DIS_LINE = \"#F79646\"\n",
    "\n",
    "# get date of today\n",
    "snapshot_date_now = str(datetime.datetime.now().date())\n",
    "print(\"date of today: \" + snapshot_date_now)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## excluded columns\n",
    "\n",
    "decktypeid, hashottuborspa, poolcnt, pooltypeid10, pooltypeid2, pooltypeid7, storytypeid, fireplaceflag, taxdelinquencyflag"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## parcelid (type: key)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"parcelid\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## airconditioningtypeid (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"airconditioningtypeid\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## architecturalstyletypeid (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"architecturalstyletypeid\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## basementsqft (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"basementsqft\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## bathroomcnt (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"bathroomcnt\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## bedroomcnt (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"bedroomcnt\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## buildingclasstypeid (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"buildingclasstypeid\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## buildingqualitytypeid (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"buildingqualitytypeid\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## calculatedbathnbr (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"calculatedbathnbr\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## finishedfloor1squarefeet (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"finishedfloor1squarefeet\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## calculatedfinishedsquarefeet (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"calculatedfinishedsquarefeet\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## finishedsquarefeet12 (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"finishedsquarefeet12\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## finishedsquarefeet13 (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"finishedsquarefeet13\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## finishedsquarefeet15 (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"finishedsquarefeet15\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## finishedsquarefeet50 (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"finishedsquarefeet50\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## finishedsquarefeet6 (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"finishedsquarefeet6\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## fips (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"fips\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## fireplacecnt (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"fireplacecnt\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## fullbathcnt (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"fullbathcnt\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## garagecarcnt (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"garagecarcnt\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## garagetotalsqft (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"garagetotalsqft\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## heatingorsystemtypeid (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"heatingorsystemtypeid\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## latitude (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"latitude\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## longitude (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"longitude\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## lotsizesquarefeet (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"lotsizesquarefeet\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## poolsizesum (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"poolsizesum\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## propertycountylandusecode (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"propertycountylandusecode\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## propertylandusetypeid (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"propertylandusetypeid\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## propertyzoningdesc (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"propertyzoningdesc\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## rawcensustractandblock (type: key)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"rawcensustractandblock\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## regionidcity (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"regionidcity\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## regionidcounty (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"regionidcounty\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## regionidneighborhood (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"regionidneighborhood\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## regionidzip (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"regionidzip\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## roomcnt (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"roomcnt\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## threequarterbathnbr (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"threequarterbathnbr\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## typeconstructiontypeid (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"typeconstructiontypeid\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## unitcnt (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"unitcnt\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## yardbuildingsqft17 (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"yardbuildingsqft17\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## yardbuildingsqft26 (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"yardbuildingsqft26\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## yearbuilt (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"yearbuilt\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## numberofstories (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"numberofstories\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## structuretaxvaluedollarcnt (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"structuretaxvaluedollarcnt\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## taxvaluedollarcnt (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"taxvaluedollarcnt\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## assessmentyear (type: str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"assessmentyear\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## landtaxvaluedollarcnt (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"landtaxvaluedollarcnt\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## taxamount (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"taxamount\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## taxdelinquencyyear (type: numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"taxdelinquencyyear\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check basic stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_min=value_df[col].min()\n",
    "value_mean=value_df[col].mean()\n",
    "value_median=value_df[col].median()\n",
    "value_max=value_df[col].max()\n",
    "\n",
    "print(\"min: \" + str(value_min))\n",
    "print(\"mean: \" + str(value_mean))\n",
    "print(\"median: \" + str(value_median))\n",
    "print(\"max: \" + str(value_max))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_dropna = value_df[col].dropna().values\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.title(col)\n",
    "sns.distplot(value_dropna, color=\"#F79646\", norm_hist=True, hist=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#you can also use the build-in draw function\n",
    "distribution_summary_pretty(value_df, col, figsize=None, date_flag=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## censustractandblock (type: key)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "col = \"censustractandblock\"\n",
    "\n",
    "value_df = table[[col]].copy()\n",
    "nan_rate = value_df[value_df[col].isnull()].shape[0] * 1.0 / value_df.shape[0]\n",
    "num_uni = value_df[col].dropna().nunique()\n",
    "\n",
    "print(\"nan_rate: \" + str(nan_rate))\n",
    "print(\"num_uni out of \" + str(value_df[col].dropna().shape[0]) + \": \" + str(num_uni))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### check value counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "value_df[col].value_counts().head(10)"
   ]
  }
 ],
 "metadata": {},
 "nbformat": 4,
 "nbformat_minor": 2
}
